<template>
  <el-row class="row-title">
    <slot name="title"></slot>
    <span id="typed"></span>
  </el-row>
</template>

<script>
import Typed from "typed.js";
export default {
  name: "Title",
  props: ["saying"],
  mounted() {
    //打字机效果
    new Typed("#typed", {
      strings: [this.saying],
      typeSpeed: 90,
      loop: true,
    });
  },
};
</script>
<style scoped>
.row-title {
  background-color:  #009999;
  border-radius: 10px;
  height: 120px;
  color:beige ;
}
</style>